//
//  ResponseError.swift
//  APPDomain
//
//  Created by raymond Peng on 2018/7/22.
//  Copyright © 2018 TanBaYe. All rights reserved.
//

import Foundation

/// 普通错误
public protocol CommonError: Error {
    /// 错误代码
    var errorCode: Int { get }

    /// 错误信息
    var errorMessage: String { get }

    /// 生成普通错误对象
    ///
    /// - Parameters:
    ///   - errorCode: 错误代码
    ///   - errorMessage: 错误信息
    init(errorCode: Int, errorMessage: String)
}
